package com.wanxi.sanyuan;

import java.util.Scanner;

public class MySanYuan {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第1个整数");
        int num1 = scanner.nextInt();
        System.out.println("请输入第2个整数");
        int num2 = scanner.nextInt();

        System.out.println("请输入第3个整数");
        int num3 = scanner.nextInt();
        String tishi1 = num1 > num2 ? "第一个数" : "第二个数";
        int max1 = num1 > num2 ? num1 : num2;
        System.out.println("前面两个数的最大值为：" + tishi1 + max1);
        int max2 = max1 > num3 ? max1 : num3;
        String tishi2 = max1 > num3 ? tishi1 : "第三个数";
        System.out.println("三个数的最大值为:" + tishi2 + max2);

    }
}
